package cn.wx.common.properties;

import lombok.Data;
import org.springframework.util.Assert;

/**
 * 微信配置
 *
 * @author: sunshaoping
 * @date: Create by in 3:02 下午 2020/5/22
 */
@Data
public class WxProperties {

    /**
     * spring bean name,不可重复
     */
    private String name;

    /**
     * 设置微信的appId
     */
    private String appId;

    /**
     * 设置微信的app secret
     */
    private String secret;

    /**
     * 设置微信的token
     */
    private String token;

    /**
     * 设置微信的EncodingAESKey
     */
    private String aesKey;


    public void verification(String prefix) {
        Assert.hasText(appId, prefix + ".app-id,必输");
        Assert.hasText(name, prefix + ".name,必输");
    }

}
